-- GENERATED SPELL FOR [Netherstrand Longbow] --


function spell0_21268(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(36994,pUnit)
pUnit:RegisterEvent('Sorts_21268', 1252, 1)
end

function spell1_21268(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(36979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21268', 653, 1)
end

function spell2_21268(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(36980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21268', 606, 1)
end

function Sorts_21268(pUnit, Event)
local choix_sorts_21268 = math.random(0, 2)
if choix_sorts_21268 == 0 then
pUnit:RegisterEvent('spell0_21268', 1, 1)
end
if choix_sorts_21268 == 1 then
pUnit:RegisterEvent('spell1_21268', 1, 1)
end
if choix_sorts_21268 == 2 then
pUnit:RegisterEvent('spell2_21268', 1, 1)
end
end

function mob21268_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21268', math.random(1500, 3000), 1)
end

function mob21268_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21268_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21268_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21268, 1, 'mob21268_Action')
RegisterUnitEvent(21268, 2, 'mob21268_Leave')
RegisterUnitEvent(21268, 3, 'mob21268_Kill')
RegisterUnitEvent(21268, 4, 'mob21268_Die')
